﻿<UserControl x:Class="RadoviciDemo.DragAndDrop"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:RadoviciPanels="clr-namespace:Radovici.Ctrls.Panels;assembly=RadoviciCtrls"
             xmlns:RadoviciContentCtrls="clr-namespace:Radovici.Ctrls.ContentControls;assembly=RadoviciCtrls">
    <Canvas>
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition MinHeight="50"/>
                <RowDefinition MinHeight="50"/>
                <RowDefinition MinHeight="50"/>
            </Grid.RowDefinitions>
            <RadoviciContentCtrls:Dragable Grid.Row="0" IsDragPermanent="True">
                <TextBlock Text="Drag me!"/>
            </RadoviciContentCtrls:Dragable>            
            <RadoviciContentCtrls:Dropable SourceDataContext="{Binding Input}" Grid.Row="1">
                <TextBox Text="{Binding Input, Mode=TwoWay}"/>
            </RadoviciContentCtrls:Dropable>
            <RadoviciContentCtrls:DropTarget TargetDataContext="{Binding}" Function="Add" Grid.Row="2">
                <TextBlock Text="{Binding Output}"/>
            </RadoviciContentCtrls:DropTarget>
        </Grid>
    </Canvas>
</UserControl>
